<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<link rel="stylesheet" href="${initParam.root}/css/board.css" type="text/css">

<div id="mainCss">
	<table border="3" cellpadding="6">
		<caption>Q&A 게시판</caption>
		<thead>
		<tr>
			<th>NO</th><th >제목</th><th >이름</th><th >작성일</th><th>HIT</th>
		</tr>		
			<c:forEach var="qvo" items="${requestScope.list.list}">		
			<tr>
			    <td>${qvo.qnaNo }</td>	
			    
			    <td class="titleView">
					<c:if test="${qvo.relevel!=0}">
					<c:forEach begin="0" end="${qvo.relevel}" step="1">&nbsp;&nbsp;</c:forEach>
					<img src="${initParam.root }/img/reply.jpg">
					</c:if>
					<a href="${initParam.root}qna/showQnaContent.moja?qnaNo=+${qvo.qnaNo }">${qvo.qnaTitle}</a>
				</td>				
			  				
				<td>${qvo.qnaWriter }</td>
				<td>${qvo.qnaDate }</td>
				<td>${qvo.viewCount }</td>
			</tr>			
			</c:forEach>
	</table>
	<a href="${initParam.root }qna/writeQna_view.moja"><img id="writeImg" src="${initParam.root }/img/write_btn.jpg" border="0"></a>
	<hr>
	<br></br>	 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
	<c:if test="${requestScope.list.pagingBean.previousPageGroup}">
	 <a href=
	 "getQnaList.moja?pageNo=${requestScope.list.pagingBean.
	 startPageOfPageGroup-1}"><img src="${initParam.root }/img/left_arrow_btn.gif"></a>
	 </c:if>
	 &nbsp;&nbsp;
	<c:forEach var="i" 
	begin="${requestScope.list.pagingBean.startPageOfPageGroup}"
	 end="${requestScope.list.pagingBean.endPageOfPageGroup}">
	 <c:choose>
	 <c:when test="${requestScope.list.pagingBean.nowPage!=i}">
	 <a href="getQnaList.moja?pageNo=${i}">${i}</a>
	 </c:when>
	 <c:otherwise>
	${i}
	</c:otherwise>
	</c:choose>
	</c:forEach>	 
	&nbsp;&nbsp;
	 <c:if test="${requestScope.list.pagingBean.nextPageGroup}">
	 <a href=
	 "getQnaList.moja?pageNo=${requestScope.list.pagingBean.
	 endPageOfPageGroup+1}">
	 <img src="${initParam.root }/img/right_arrow_btn.gif">
	 </a>
	 </c:if>	
</div>